//
//  AppNetRequest.h
//  MoreFun
//
//  Created by Pro on 2018/5/12.
//  Copyright © 2018年 Pro. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface AppNetRequest : NSObject

@property (assign, nonatomic) BOOL showLog;

+(AppNetRequest *)ShareAppNetRequestWithShowLog:(BOOL)show;

//Get
-(void)AF_GetNetWorkWithHeaderUrlStr:(NSString *)urlStr Parameter:(id)parameter completion:(void (^)(NSDictionary *dic,NSError *error))completion;

//Post
-(void)AF_PostNetWorkWithHeaderUrlStr:(NSString *)urlStr Parameter:(id)parameter completion:(void (^)(NSDictionary *dic,NSError *error))completion;

#pragma mark - -图片上传

// 单张图片上传
-(void)AF_File_postOneFileToNetWorkWithURL:(NSURL *)url body:(NSDictionary *)dic imageFileName:(NSString *)filename completion:(void (^)(NSData *data,NSError *error))completion;

//多张图片上传
-(void)AF_File_postSomeFileToNetWorkWithURL:(NSString *)strUrl dicPostParams:(NSMutableDictionary *)params dicImages:(NSMutableDictionary *)dicImages completion:(void (^)(NSData *, NSError *))completion;


-(void)AF_Icon_postOneFileToNetWorkWithUrlStr:(NSString *)urlStr Parameter:(id)parameter andImageData:(NSData *)imaData Success:(void (^)(NSDictionary *dic))success  Failure:(void (^)(void))failure;

#pragma mark - - 数据转换

//将data 转成字典
-(NSDictionary *)dataWihtDictionary:(NSData *)data;

//将data 转成字符串
-(NSString *)dataWihtString:(NSData *)data;


@end
